package com.psy.counseling.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.psy.counseling.entity.Ask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.psy.counseling.entity.User;
import com.psy.counseling.vo.AnalysisVO;
import com.psy.counseling.vo.AskVO;
import com.psy.counseling.vo.SendInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author 陈兴海
 * @since 2022-05-31
 */
@Repository
public interface AskMapper extends BaseMapper<Ask> {
    /**
     * 通过初防学生id获取咨询记录
     * @param id
     * @return
     */
    List<Ask> getAskRecord(Long id);

    /**
     * 通过咨询id获取发送邮件的基本信息
     * @param id
     * @return
     */
    SendInfoVO getSendInfo(Long id);


    List<AnalysisVO> listAskRecord(String teacherName);

    Page<Ask> getAskInfo(String userName, String teacherName, Page<Ask> page);
}
